import java.lang.Thread;

public class Test8 {
    public static void main(String[] args) {
        Print3 p3 = new Print3();


        p3.start();

        Print4 p4 = new Print4();

        new Thread(p4).start();
    }
}

class Print3 extends Thread {
    public void run() {
        for (int i = 1; i <= 500; i++) {
            if (i % 2 == 1) {
                System.out.println(Thread.currentThread().getName() + ": " + i);
            }

            try {
                Thread.sleep(1000);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
}

class Print4 implements Runnable {
    public void run() {
        for (int i = 600; i <= 1000; i++) {
            if (i % 2 == 0) {
                System.out.println(Thread.currentThread().getName() + ": " + i);
            }

            try {
                Thread.sleep(2000);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
}